<template>
	<view class="history-box">
	<!-- 	<uni-nav-bar @clickLeft="goBack" left-icon="left" left-text="返回" title="查看状态" backgroundColor='transparent'
			:border='false' /> -->
		<view class="history-content">
			<view class="history-content-info">
				<view class="content-info-item">
					<view class="content-info-item-title">
						义务人类型:
					</view>
					<view class="content-info-item-message">
						{{getApplyType(deatailData.applyType)}}
					</view>
				</view>
				<view class="content-info-item">
					<view class="content-info-item-title">
						义务人姓名:
					</view>
					<view class="content-info-item-message">
						{{deatailData.ywrMc}}
					</view>
				</view>
				<view class="content-info-item">
					<view class="content-info-item-title">
						证件类型:
					</view>
					<view class="content-info-item-message">
						{{deatailData.ywrZjlx}}
					</view>
				</view>
				<view class="content-info-item">
					<view class="content-info-item-title">
						证件号码:
					</view>
					<view class="content-info-item-message">
						{{deatailData.ywrZjh}}
					</view>
				</view>
				<view class="content-info-item">
					<view class="content-info-item-title">
						联系电话:
					</view>
					<view class="content-info-item-message">
						{{deatailData.ywrPhone}}
					</view>
				</view>
				<view class="content-info-item">
					<view class="content-info-item-title">
						项目名称:
					</view>
					<view class="content-info-item-message">
						{{deatailData.projectName}}
					</view>
				</view>
				<view class="content-info-item">
					<view class="content-info-item-title">
						项目编号:
					</view>
					<view class="content-info-item-message">
						{{deatailData.projectNo}}
					</view>
				</view>
				<view class="content-info-item">
					<view class="content-info-item-title">
						区县名称:
					</view>
					<view class="content-info-item-message">
						{{deatailData.qxmc}}
					</view>
				</view>
				<!-- <view class="content-info-item">
					<view class="content-info-item-title">
						申请复垦项目:
					</view>
					<view class="content-info-item-message">
						{{deatailData.sqfkxm}}
					</view>
				</view>
				<view class="content-info-item">
					<view class="content-info-item-title">
						申请验收面积:
					</view>
					<view class="content-info-item-message">
						{{deatailData.sqysmj}}
					</view>
				</view> -->
				<view class="content-info-item" v-if="deatailData.pzwh">
					<view class="content-info-item-title">
						批准文号:
					</view>
					<view class="content-info-item-message">
						{{deatailData.pzwh}}
					</view>
				</view>
				<view class="content-info-item" v-if="deatailData.pzwh">
					<view class="content-info-item-title">
						批准日期:
					</view>
					<view class="content-info-item-message">
						{{deatailData.pzrq}}
					</view>
				</view>
			</view>
			<view class="history-content-info">
				<view class="history-content-info-title">
					流程节点
				</view>
				<steps-box :nodeList='nodeList'></steps-box>
				<!-- <uni-steps :options="list2"  active-color="#07C25B" :active="active" direction="column" /> -->
			</view>
		</view>
	</view>
</template>

<script>
	// import FormItem from '@/components/FromItem.vue'
	// import FormFooter from '@/components/FormFooterView.vue'
	import StepsBox from '@/components/StepsBox.vue'
	import request from '@/utils/request.js'
	export default {
		data() {
			return {
				active:1,
				isShowStep:false,
				deatailData:{
					projectNo:'',
					projectName:''
				},
				nodeList: []
			};
		},
		components: {
			StepsBox,
			// FormItem,
			// FormFooter,
		},
		onLoad(options) {
			
			this.loadData(options.id)
			// this.loadData('d6518394c8774344d43b89whwh')
		},
		methods: {
			getApplyType(val){
				return val == 3 ? '法人':'自然人'
			},
			loadData(id){
				request.get('/lsydfk/applies/applyInfo/id?id='+id).then(res=>{
					if (res) {
						console.log(res,'rop')
						this.deatailData = res
						this.nodeList = JSON.parse(res.audits)
						console.log(this.nodeList)
					}
					
				}).catch(err=>{
					uni.showToast({
						title:err,
						icon:'none'
					})
				})
			},
			goBack() {
				uni.navigateBack({
					delta: 1
				})
			},
			submitClicked(){
				this.isShowStep = true
			},
		},
	}
</script>

<style lang="scss">
	uni-page-body {
		// height: 100%;
	}
	.content-info-item{
		display: flex;
		align-items: center;
		font-size: 30rpx;
		padding: 10rpx 0rpx;
		&-title{
			min-width: 180rpx;
			color: black;
			
		}
		&-message{
			color: #999999;
		}
	}
	.history-box {
		// background-image: url(../static/image/history-bg.png);
		// background-repeat: no-repeat;
		// background-size: 100% 100%;
		width: 100%;
		height: 100%;
		background-color: #FFFFFF;
		// overflow: hidden;
	}

	.history-title {
		font-weight: 500;
		font-size: 53rpx;
		color: #FFFFFF;
		line-height: 83rpx;
	}

	.history-content {
		background-color: #FFFFFF;
		margin: 20rpx;
		padding: 20rpx;
		// border-radius: 28rpx 28rpx 0rpx 0rpx;
		height: 100%;

		&-info {
			padding: 20rpx 0rpx;

			&-title {
				font-weight: 500;
				font-size: 32rpx;
				line-height: 32rpx;
				color: #000000;
				border-left: solid 6rpx #4385E7;
				padding: 0rpx 20rpx;
				margin: 20rpx 0rpx;
			}
		}
	}
</style>